# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: juergen <juergen@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=most
pkgver=5.0.0a
pkgrel=7
pkgdesc="A terminal pager similar to 'more' and 'less'"
arch=('x86_64')
depends=('slang')
license=('GPL')
url="http://www.jedsoft.org/most/index.html"
source=(ftp://space.mit.edu/pub/davis/${pkgname}/${pkgname}-${pkgver}.tar.gz
        most-debian.patch
        most-leak-fd.patch)
sha512sums=('8487895d736ea19a7a635dc67c974104a0c469a88a74f8b757a0509b9dee4534fd70b966054624be71734ac7de9a9daa1efb56827ff176b9468ce5a0b1ed2349'
            '5d1f445022da47596b76c3fff47c3b1a548c3d016fbd0785b7f57f916a93c3cde939645404d64d5ba3b900764633917639e461c14d6dd54032822f9d992418ba'
            '387088b5fc11ca4089e1aaa99b5093b5a7157710f37432c48224aec5db0a2a6ad0c07d2714ceabb22d550128a172d6d2878a71e27b29df088a7d61ee05b563c5')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -Np1 -i ../most-debian.patch
  patch -Np1 -i ../most-leak-fd.patch
  ./configure --prefix=/usr --sysconfdir=/etc
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
